//============================================================================
// Name        : Test.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include "EpsilonPolicy.h"
#include "Coordinate.h"
#include "GridWorld.h"
using namespace std;

int main() {
	double epsilon = 0.1f;
	double alfa = 0.1f;
	double gamma = 0.9f;
	int x = 7;
	int y = 7;

	Coordinate *goal = new Coordinate(5, 6);
	Coordinate *start = new Coordinate(1, 0);
	EpsilonPolicy *policy = new EpsilonPolicy(epsilon);
	GridWorld *world = new GridWorld(x, y, alfa, gamma, goal, start);

	for (int i = 0; i < 10000; i++) {
		while (!world->isInGoal()) {
			world->takeStep(policy);
			//world -> printQValues();
			//world -> bestDirection();
		}
		world->reset();
	}
	world -> bestDirection();
	world -> printQValues();

	return 0;
}
